package com.guan.ordering_sys.generator.controller;


import com.guan.ordering_sys.common.ResultApi;
import com.guan.ordering_sys.generator.service.impl.GoodsTypeParameterServiceImpl;
import com.guan.ordering_sys.vo.GoodsTypeParameterVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 关远键
 * @since 2021-06-18
 */
@Api(tags = "商品类型参数控制器")
@RestController
@RequestMapping("/api/goods-type-parameter")
public class GoodsTypeParameterController {

    @Autowired
    private GoodsTypeParameterServiceImpl typeParameterService;

    @ApiOperation("商品类型参数")
    @GetMapping("/getParam/{id}")
    public ResultApi getParamById(@PathVariable("id") Long id) {
        GoodsTypeParameterVo param = typeParameterService.getParamById(id);
        return ResultApi.success(param);
    }

}

